//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#ifndef _ProcessListCATHCodeToDonutChart_h__
#define _ProcessListCATHCodeToDonutChart_h__
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#include <DonutStatistic.h>
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
class ProcessListCATHCodeToDonutChart { 

  private:

    String*                  toString;
    bool                     GetSegmentInPosition (char* text, int position, char* separators, char* result);
    bool                     GetSegmentUntilPosition (char* text, int position, char separator, char* result);
    
  protected:

    String*                  filenameOut;
    String*                  filenameIn;
    TListE <DonutStatistic>* listDonutStatistic [9];
    TListE <String>*         listCATHCode;
    
    bool                     ComputePercentages (void);

  public:

    ProcessListCATHCodeToDonutChart ();
    ProcessListCATHCodeToDonutChart (const ProcessListCATHCodeToDonutChart&);
    ProcessListCATHCodeToDonutChart (const ProcessListCATHCodeToDonutChart*);

    ~ProcessListCATHCodeToDonutChart ();

    void                      FilenameOut (String* filenameOut);
    void                      FilenameIn (String* filenameIn);
    void                      ListDonutStatistic (TListE <DonutStatistic>* listDonutStatistic [9]);
    void                      ListCATHCode (TListE <String>* listCATHCode);

    String*                   FilenameOut (void);
    String*                   FilenameIn (void);
    TListE <DonutStatistic>** ListDonutStatistic (void);
    TListE <String>*          ListCATHCode (void);

    String*                   ToString (void);
    bool                      LoadFileCATHCode (void);
    bool                      WriteStatisticData (void);

    ProcessListCATHCodeToDonutChart operator= (const ProcessListCATHCodeToDonutChart& processListCATHCodeToDonutChart);

};
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#endif
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
